<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateProductPivotTagTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('product_pivot_tag', function(Blueprint $table)
		{
			$table->integer('id', true);
			$table->integer('product_id')->default(0)->comment('关联Products表的id');
			$table->integer('product_tag_id')->default(0)->comment('关联product_tags表的id');
			$table->timestamps();
		});
	}


	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('product_pivot_tag');
	}

}
